
  
  #ifndef __SCALP_FUNCTION__
  #define __SCALP_FUNCTION__
  
  namespace scalp {
  
    template<typename Signature>
    struct CFunction;
    
    template<typename T, typename Signature>
    struct CFunctionFunctor;
    

#include "FunctionBody.h"
    
    template<typename T>
    struct TMakeFunctionFunctorHelper
    	{
    	const T& iT;
    	TMakeFunctionFunctorHelper(const T& aT) : iT(aT) { }
    	template<typename Signature>
    	operator CFunction<Signature>* ()
		{
			return new (ELeave) CFunctionFunctor<T, Signature>(iT);
		}
    	};
    
    template<typename T>
    TMakeFunctionFunctorHelper<T> MakeFunctionL(const T& aT)
	{
	return TMakeFunctionFunctorHelper<T>(aT);
	}
        
    } // namespace scalp
    #endif // __SCALP_FUNCTION__

    
